package create.singleton;

/**
 * 单线程下单例，多线程下存在问题
 * @author guob
 *
 */
public class SingleThreadSingleton {
	private static SingleThreadSingleton instance = null;

	private SingleThreadSingleton() {
	}

	public static SingleThreadSingleton getInstance() {
		if (instance == null) {
			instance = new SingleThreadSingleton();
		}
		return instance;
	}
}
